<template>
  <index v-slot:addForm="data">
    <add :data-form="data.dataForm" v-slot:after="addData" :cancel="data.cancel">
      <template v-for="item in addData.attributes" v-if="item.name === 'dictPid'">
        <el-form-item :label="item.text">
          <el-select v-model="addData.dataForm[item.name]" filterable placeholder="请选择">
            <el-option :key="0" label="根节点" :value="0"></el-option>
            <el-option v-for="dict in item.dictList" :key="dict.id" :label="dict.name" :value="dict.id"></el-option>
          </el-select>
        </el-form-item>
      </template>
    </add>
  </index>
</template>

<style>
</style>

<script>
import Index from '@/views/common/commonModel'
import Add from '@/views/common/commonModel/add'
export default {
  name: 'Dict',
  components: { Index, Add },
  data() {
    return {
    }
  }
}
</script>
